home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Brotikasten
/
BROTCD01.iso
/
tools
/
util470.d64
/
ultraformat v2
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-08-06
|
6KB
|
167 lines
100 REM ***** ULTRAFORMAT V2.0 *****
110 : : : : :
120 REM ***** UEBERARBEITUNG : *****
130 REM ***** FRANK BERKNER *****
140 REM ***** AM GRUENEN WEG 14 *****
150 REM ***** 5024 PULHEIM 2 *****
160 :
170 POKE53280,.:POKE53281,.:POKE53272,23
175 OPEN1,8,15,"UI":PRINT#1,"I"
180 PRINT"[147][158]***** [213] L T R A F O R M A T [214]2.0 *****"
190 G$(1)="[199]ANZE [196]ISKETTE FORMATIEREN[146]"
200 G$(.)="[206]UR [211]PUR 36-41 FORMATIEREN[146]"
210 G$(2)="[213]MSCHALTPROGRAMME ERSETZEN[146]"
220 G=1:PRINTG$(1);G$(.);G$(2)
230 PRINT"[193]USWAHL MIT [195]URSORTASTEN UND [210]ETURN[146]"
240 PRINT""G$(G):WAIT198,1:GETG$
260 IFG$=CHR$(13)THEN320
270 IFG$=""THENIFG=1THENPRINTG$(G):G=.:GOTO240
280 IFG$=""THENIFG=.THENPRINTG$(G):G=2:GOTO240
290 IFG$="[145]"THENIFG=.THENPRINTG$(G):G=1:GOTO240
300 IFG$="[145]"THENIFG=2THENPRINTG$(G):G=.:GOTO240
310 GOTO240
320 IFG=1THENGOSUB1190
330 IFG=2THENGOTO1330
340 PRINT"[196]ISKSWITCHES ABSPEICHERN :[158]"
345 PRINT"1[146]) [206]ORMAL ALS [208][210][199] (BELEGT 2 [194]LOECKE)"
350 PRINT"2[146]) [193]UF [212]RACK 18 (BELEGT 0 [194]LOECKE)"
360 WAIT198,1:GETA$
370 IFA$="1"THENY=1
380 IFA$<>"1"ANDA$<>"2"THEN360
390 REM ***** VORBEREITUNGEN
400 OPEN2,8,2,"#1"
410 PRINT#1,"M-W"CHR$(81)CHR$(.)CHR$(1)CHR$(255)
420 PRINT#1,"M-W"CHR$(.)CHR$(.)CHR$(1)CHR$(192)
430 PRINT#1,"M-W"CHR$(8)CHR$(.)CHR$(2)CHR$(36)CHR$(.)
440 PRINT#1,"M-W"+CHR$(7)+CHR$(28)+CHR$(1)+CHR$(15)
450 REM ***** UEBERTRAGUNG
460 A$="":FORX=.TO32:READA:A$=A$+CHR$(A):NEXT
470 PRINT#1,"B-P"2;.:PRINT#2,A$;
480 REM ***** FORMATIERUNG
490 PRINT#1,"M-W"CHR$(1)CHR$(.)CHR$(1)CHR$(224)
500 REM ***** DATAS EINLESEN
510 FORQ=.TO72:READA:NO$=NO$+CHR$(A):NEXT
520 FORQ=.TO195:READA:D$(2)=D$(2)+CHR$(A):NEXT
530 FORQ=.TO195:READA:D$(3)=D$(3)+CHR$(A):NEXT
540 REM ***** WARTEN AUF FORMATENDE
550 PRINT#1,"M-R"CHR$(1)CHR$(.)CHR$(1):GET#1,A$:IFASC(A$+CHR$(.))>127THEN550
560 REM ***** DIREKTORY-GENERATOR
570 GOSUB1100:PRINT#1,"U1"2;.;18;.
580 GOSUB1140:PRINT#1,"B-P"2;4
590 A$="":FORX=4TO71:A$=A$+CHR$(.):NEXT
600 A$=A$+CHR$(17)+CHR$(252)+CHR$(255)+CHR$(7)
610 FORX=76TO95STEP4:A$=A$+CHR$(19)+CHR$(255)+CHR$(255)+CHR$(7):NEXT
620 FORX=96TO143:A$=A$+CHR$(.):NEXT:PRINT#2,A$;
630 PRINT#1,"B-P"2;162:PRINT#2,"OBEN ";
640 PRINT#1,"U2"2;.;18;.
650 REM ***** NOTHILFE-GENERATOR
660 PRINT#1,"B-P"2;.
670 A$=CHR$(.)+CHR$(255)+CHR$(130)+CHR$(18)+CHR$(2)+"NICHT VALIDIEREN"
680 FORX=22TO255:A$=A$+CHR$(.):NEXT
690 PRINT#2,A$;:PRINT#1,"U2"2;.;18;1
700 PRINT#1,"B-P"2;.
710 A$=CHR$(.)+CHR$(79)+CHR$(.)+CHR$(4)+NO$
720 PRINT#2,A$;:PRINT#1,"U2"2;.;18;2
730 GOSUB1100
740 REM ***** DISKSWITCHES SCHREIBEN
750 IFYTHEN1230: REM NORMAL ?
760 REM ***** 0 BLOCK
770 PRINT#1,"U1"2;.;18;.:PRINT#1,"B-P"2;73:V=1:S=.
780 GET#2,X$:X=ASC(X$+CHR$(.))
790 FORJ=.TO7:X=X/2:IFX<>INT(X)THENG(V)=S:V=V+1
800 IFV=4THEN840
810 S=S+1:X=INT(X):NEXT
820 IFS>18THENCLOSE2:GOTO1240
830 GOTO780
840 FORZ=1TO2:IFZ=1THENN$=" C000":K=.:L=192:V=2
850 IF Z=2THENN$=" 033C":K=60:L=3:V=3
860 T=18:S=1
870 PRINT#1,"U1"2;.;T;S:PRINT#1,"B-P"2;.
880 GET#2,T1$,S1$:T1=ASC(T1$+CHR$(.)):S1=ASC(S1$+CHR$(.))
890 IFT1THENT=T1:S=S1:GOTO870
900 FORQ=.TO7:PRINT#1,"B-P"2;Q*32+2
910 GET#2,X$:IFASC(X$+CHR$(.))=0THEN 930
920 NEXT
930 PRINT#1,"B-P";2;Q*32+2
940 A$=CHR$(130)+CHR$(18)+CHR$(G(V))+"DISKSWITCH"+N$+CHR$(160):PRINT#2,A$;
950 PRINT#1,"B-P"2;Q*32+30:PRINT#2,CHR$(.);CHR$(.)
955 PRINT#1,"B-P"2;.:PRINT#2,CHR$(.)
960 PRINT#1,"U2 2 0";T;S
970 REM ***** DATAS SCHREIBEN
980 PRINT#1,"B-P 2";.
990 A$=CHR$(.)+CHR$(199)+CHR$(K)+CHR$(L)
1000 FORQ=.TO.:A$=A$+D$(V):NEXT
1010 PRINT#2,A$;:PRINT#1,"U2"2;.;18;G(V)
1020 PRINT#1,"B-A";.;18;G(V)
1030 NEXT
1040 REM ***** ENDE
1050 INPUT#1,A,B$,C,D:PRINTA;B$;C;D
1060 CLOSE2:CLOSE1:END
1070 :
1080 REM ***** UNTERPROGRAMME
1090 REM ***** SPURSCHALTPROGRAMME
1100 PRINT#1,"M-W"CHR$(6)CHR$(.)CHR$(2)CHR$(1)CHR$(.)
1110 PRINT#1,"M-W"CHR$(.)CHR$(.)CHR$(1)CHR$(128)
1120 PRINT#1,"M-R"CHR$(.)CHR$(.)CHR$(1):GET#1,A$:IFASC(A$+CHR$(.))>127THEN1120
1130 RETURN
1140 PRINT#1,"M-W"CHR$(6)CHR$(.)CHR$(2)CHR$(36)CHR$(.)
1150 PRINT#1,"M-W"CHR$(.)CHR$(.)CHR$(1)CHR$(176)
1160 PRINT#1,"M-R"CHR$(.)CHR$(.)CHR$(1):GET#1,A$:IFASC(A$+CHR$(.))>127THEN1160
1170 RETURN
1180 REM ***** NORMAL FORMATIEREN
1190 INPUT"DISK-NAME";N$:N$=LEFT$(N$,12)
1200 INPUT"DISK-ID ";ID$:ID$=LEFT$(ID$,2)
1210 PRINT#1,"N:"+N$+","+ID$:PRINT#1,"I"
1215 INPUT#1,A,B$,C,D:IFATHENPRINTA;B$;C;D:CLOSE1:END
1220 RETURN
1230 REM ***** DISKSWITCHES NORMAL
1240 K=49152:N$=" C000":V=2:GOSUB1270
1250 K=828:N$=" 033C":V=3:GOSUB1270
1260 GOTO1050
1270 OPEN3,8,2,"DISKSWITCH"+N$+",P,W"
1280 INPUT#1,A,B$,C,D:IFATHENPRINTA;B$;C;D:CLOSE3:GOTO1060
1290 PRINT#3,CHR$(INT(K-INT((K/256))*256))CHR$(INT(K/256));
1300 PRINT#3,D$(V);:CLOSE3
1310 RETURN
1320 REM ***** DISKSWITCHES ERSETZEN
1330 PRINT" [196]ISKETTE EINLEGEN !":WAIT198,1:GETA$
1340 PRINT#1,"S:DISKSWITCH*"
1350 OPEN2,8,2,"#":FORQ=.TO105:READA:NEXT
1360 FORQ=.TO195:READA:D$(2)=D$(2)+CHR$(A):NEXT
1370 FORQ=.TO195:READA:D$(3)=D$(3)+CHR$(A):NEXT:GOTO770
1372 :
1375 REM ***** DATAS *****
1380 :
1390 REM FORMAT-DATAS
1400 DATA165,81,201,255,240,24,165,81,201,1,208,6,169,18,133,81,133,34
1410 DATA165,81,201,25,208,6,169,36,133,81,133,34,76,199,250
1420 REM NOTHILFE DATAS
1430 DATA169,7,133,183,169,1,133,184,169,15,133,185,169,8,133,186,169,65,133
1435 DATA187,169,4,133,188,32,192,255,169,1,32,195,255,169,1,133,183,169,8
1440 DATA133,184,169,15,133,185,169,8,133,186,169,72,133,187,169,4,133,188,32
1445 DATA192,255,169,255,32,195,255,96,77,45,87,0,0,1,192,73
1450 REM VON 49152 - 49347
1460 DATA169,11,141,24,3,169,192,141,25,3,96,120,169,161,141,24,3
1470 DATA169,2,133,183,169,20,133,184,169,15,133,185,169,8,133,186,169
1480 DATA193,133,187,169,192,133,188,32,192,255,169,20,32,195,255,173,162
1490 DATA192,240,11,32,109,192,169,0,141,162,192,76,142,192,32,76,192
1500 DATA169,1,141,162,192,76,142,192,169,9,133,183,169,163,133,187,32
1510 DATA192,255,169,20,32,195,255,169,8,133,183,169,171,133,187,32,192
1520 DATA255,169,20,32,195,255,96,169,9,133,183,169,178,133,187,32,192
1530 DATA255,169,20,32,195,255,169,8,133,183,169,186,133,187,32,192,255
1540 DATA169,20,32,195,255,96,169,2,133,183,169,193,133,187,32,192,255
1550 DATA169,20,32,195,255,32,0,192,64,1,77,45,87,6,0,2,36
1560 DATA0,77,45,87,0,0,1,176,77,45,87,6,0,2,1,0,77,45,87,0,0,1,128,73,68,78
1570 REM VON 828 - 1023
1580 DATA169,71,141,24,3,169,3,141,25,3,96,120,169,221,141,24,3
1590 DATA169,2,133,183,169,20,133,184,169,15,133,185,169,8,133,186,169
1600 DATA253,133,187,169,3,133,188,32,192,255,169,20,32,195,255,173,222
1610 DATA3,240,11,32,169,3,169,0,141,222,3,76,202,3,32,136,3
1620 DATA169,1,141,222,3,76,202,3,169,9,133,183,169,223,133,187,32
1630 DATA192,255,169,20,32,195,255,169,8,133,183,169,231,133,187,32,192
1640 DATA255,169,20,32,195,255,96,169,9,133,183,169,238,133,187,32,192
1650 DATA255,169,20,32,195,255,169,8,133,183,169,246,133,187,32,192,255
1660 DATA169,20,32,195,255,96,169,2,133,183,169,253,133,187,32,192,255
1670 DATA169,20,32,195,255,32,60,3,64,1,77,45,87,6,0,2,36
1680 DATA0,77,45,87,0,0,1,176,77,45,87,6,0,2,1,0,77,45,87,0,0,1,128,73,68,0